<?php require VIEW_ROOT.'/common/header.php'?>

<div class="info">
	<a href="?m=finance&a=aud_form">[添加审计]</a>
	距最后一次审计，
	已过 <b><?php echo (strtotime(date('Y-m-d')) - strtotime(date('Y-m-d', $audit_last['create_time']))) / 86400; ?></b> 天。
	出账 <b><?php echo library_common::money_num($payout_last)?></b>，
	入账 <b><?php echo library_common::money_num($income_last); ?></b>。
	应结余
	(<b><?php echo $audit_last['amount']; ?></b>
	-
	<b><?php echo library_common::money_num($payout_last); ?></b>
	+
	<b><?php echo library_common::money_num($income_last); ?></b>)
	=
	<b><?php echo library_common::money_num($audit_last['amount'] - $payout_last + $income_last)?></b>
	。
</div>

<table>
	<tr>
		<th width="120">时间</th>
		<th width="80">总额</th>
		<th>备注</th>
		<th width="80">操作</th>
	</tr>
	<?php foreach ($res as $row) {?>
	<tr>
		<td><?php echo date('n月j日', $row['create_time'])?></td>
		<td><b><?php echo library_common::money_num($row['amount'])?></b></td>
		<td class="frm"><?php echo nl2br($row['note'])?></td>
		<td>
			<a href="?m=finance&a=aud_form&aud_id=<?php echo $row['aud_id']?>">编辑</a>
			<a href="?m=finance&a=aud_delete&aud_id=<?php echo $row['aud_id']?>" onclick="return confirm('确认要删除?')">删除</a>
		</td>
	</tr>
	<?php } // end foreach?>
</table>

<?php require VIEW_ROOT.'/common/footer.php'?>